package org.study.service.config;

import org.springframework.stereotype.Service;
import org.study.entity.ClusterInfoEntity;
import org.study.service.IClusterInfoService;

import java.util.ArrayList;
import java.util.List;

/**
 * 接口和数据库版本一致，这里是无数据库版本
 */
@Service("clusterInfoServiceConfig")
public class ClusterInfoServiceConfig implements IClusterInfoService {

    @Override
    public List<ClusterInfoEntity> selectByList(ClusterInfoEntity entity) {
        List<ClusterInfoEntity> list = new ArrayList<>();
        ClusterInfoEntity clusterInfoEntity = new ClusterInfoEntity();
        clusterInfoEntity.setClusterId(1);
        clusterInfoEntity.setClusterName("cms");
        clusterInfoEntity.setUser("cms");
        clusterInfoEntity.setPassword("123123");
        clusterInfoEntity.setInstallPath("/opt/module");
        clusterInfoEntity.setUploadPath("/opt/upload");
        clusterInfoEntity.setContent("这是一个测试集群");
        clusterInfoEntity.setHighAvailable(1);
        list.add(clusterInfoEntity);
        return list;
    }
}
